package com.gzq.factorymethod.exam30.simplefactory;

import com.gzq.factorymethod.exam30.IHuman;

public class StaticFactory {
	
	public static <T extends IHuman> T create(Class<T> ct) {
		T newInstance = null;
		try {
			newInstance = ct.newInstance();
		} catch (InstantiationException | IllegalAccessException e) {
			e.printStackTrace();
		}
		return newInstance;
	}
}
